<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.org/ui">
    <f:view contentType="text/html">
        <h:head>
            <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
            <link href="./resources/css/default.css" rel="stylesheet" type="text/css" />
            <title>Đăng nhập hệ thống</title>
        </h:head>
        <h:body>
            <h:form>
                <p:growl id="growl" globalOnly="true" showDetail="true" showSummary="true" autoUpdate="true"/>
                <div align="center">
                    <p:panel header="Đăng nhập" style="margin-top: 100px; width: 400px"  >
                        <p:messages showDetail="true" showSummary="true" globalOnly="true" autoUpdate="true"/>
                        <h:panelGrid columns="3" cellpadding="5">
                            Tên đăng nhập*
                            <p:inputText required="true" id="username" value="#{sessionBean.omapUser.username}" 
                                         requiredMessage="Bạn chưa điền tên đăng nhập"/>
                            <p:message for="username"/>

                            Mật khẩu*
                            <p:password feedback="false" required="true" id="password" value="#{sessionBean.omapUser.password}"
                                        requiredMessage="Bạn chưa điền mật khẩu"/>
                            <p:message for="password"/>

                            <h:outputText/>
                            <p:commandButton ajax="false" action="#{sessionBean.login()}" value="Đăng nhập"/>
                            <h:outputText/>

<!--                            <h:outputText/>
                            <p:commandLink ajax="false" value="Quên mật khẩu" />
                            <h:outputText/>

                            <h:outputText/>
                            <p:commandLink ajax="false" value="Đăng ký" />-->

                        </h:panelGrid>
                    </p:panel>
                </div>
            </h:form>
        </h:body>
    </f:view>
</html>

